Developer Notes for Time Trakker 3.x ------------------------------------ Installation & Upgrading from Previous Versions ----------------------------------------------- If you are doing a first time installation or you don't need to save any of your existing TIMEBILL entries, simply copy the Time Trakker files into a directory of your choice and make sure that you can access the files in this directory by setting your FOXPRO path to this directory (ie. SET PATH TO \TIMETRAK). Importing your existing Data ---------------------------- If you are upgrading from a version of Time Trakker of 3.0 or greater file conversion is automatic and the procedure below is not necessary. You can simply copy your old datafiles into the new Time Trakker directory. To be sure, though, back up your existing TIMEBILL.DBF and TT_CFG.DBF first before allowing the new installation to convert your files to the current format. Updating Files from Versions prior to 3.0 ------------------------------------------ Version 3.x incorporates a change in the file format of the TIMEBILL.DBF. It is therefore necessary to import your old data into the program by using the "Append from Backup" function in the Utilities menu. In order to do this I recommend to install this version of Time Trakker into a fresh directory. The shipping version of the program does not include a copy TIMEBILL.DBF as it will be created when the program is run for the first time. If upgrading, DO NOT put an old TIMEBILL.DBF file in this new Time Trakker directory or you are bound to have problems as a new file won't be created and the old file format will be incompatible. Once the new version is installed with a new TIMEBILL.DBF you can use the "Append from Backup" function to append your old data from your old TIMEBILL.DBF file into the new version of TIMEBILL.DBF. If you are upgrading from Version 2.75 or earlier be sure you follow the above procedure as it will import your data into a new datafile with the current structure. THE DATA FORMAT HAS CHANGED SINCE VERSION 2.75 SO DO THIS OR YOU ARE BOUND TO HAVE SOME PROBLEMS. The TT_CFG.DBF file has also changed format a little. DO NOT use the versions other than 3.x of this file in Version 3.x. If it is an earlier version delete it and start Time Trakker without the TT_CFG.DBF file and a new one will be created for you. You will need to re-enter your Company information and client defaults. Necessary Run-Time Files ------------------------ The registered version of Time Trakker comes with all the source code, screens, reports and the project file. Out of all those files only a few are actually needed to run Time Trakker. These are: Program Files: -------------- * TIMETRAK.APP - The actual application file for both DOS and Windows * TIMETRAK.MPR - The Menu for used to attach to the System menu. Note that this Menu is *external* from the Time Trakker project and must be re-built seperately. Data Files: ----------- * TIMEBILL.DBF - The Time Trakker data file. It will be created for you the first time you run TT. * TIMEBILL.FPT - The Time Trakker memo file. * TT_CFG.DBF - This file is created the first time you run Time Trakker. It holds your company information, bill type options and Users and client preferences. All other files included on this disk are the source files and are not required to run the actual program. The source startup program is TTmain. It also contains most of the library calls used within the Time Trakker modules. GenScrnx -------- Time Trakker was written with the help of GENSCRNX, a public domain utility that pre and post processes Screen code generated by the standard GENSCRN.PRG provided with FoxPro. The main use of GenScrnx is for visual effects using Ken Levy's Windows 3D driver, and using my own DOS3D driver for drop shadows in DOS. I limited use of GENSCRNX to these uses, so that the actual functionality of the program won't be affected when generating without GENSCRNX. However, I strongly recommend you use GENSCRNX! IMPORTANT: In order to maintain the 3D effects in Windows on re-compilation, you will need GENSCRNX. While the required files are supplied here, if you want more information GENSCRNX, the 3D effects and samples are public domain and available on CompuServe with source and docs. Make sure you use the supplied CONFIG.FPW file or set MVCOUNT=512 and _GENSCRN="GENSCRNX.PRG" in your CONFIG.FP(W) file if you choose your own. GENSCRNX's 3D driver will not generate the proper Windows 3D code under DOS. It is therefore necessary that you re-generate the Windows screens under Windows. I included all the necessary GENSCRNX and GSX drivers in order to re-generate Time Trakker in this package. The .PRG's are available, but if you need more information on how to use GENSCRNX you can download it from CompuServe's FOXFORUM library 10. The necessary GENSCRNX files are: * GENSCRNX.PRG - The GENSCRNX engine * 3D.PRG - The Windows 3D Driver * 3DBOX.PRG - Used by screens to draw 3D Boxes gets included into project * DOS3D - The DOS drop shadow driver * GSXMOVWN - Faster Screens in Windows Cross-Platform Info ------------------- Time Trakker is designed as a cross-platform application, meaning that it can run both under DOS and Windows from the same .APP file. This results in a rather large .APP file, since all screens generated are generating both DOS and Windows sections of code. If you only run under DOS or Windows, you can force the project to build only DOS or Windows code by either selecting the appropriate boxes in every screen (yeah, right) or simply USE TIMETRAK.PJX and REPLACE SAVECODE WITH .T. (this sets the DOS or Windows code only option) and rebuild the project. When editing Time Trakker screens you will find the Transporter popping up every time you try to edit a screen. This is because there are extra items in the respective DOS and Windows screens and reports. Some objects don't match exactly across platforms. For the original screens you should simply open them as is. If you make modifications try to keep track as to which items have changed and only transport those. Definitely don't transport items like text and lines, since those are most likely to be contained on one plat- form on purpose. Another thing to keep in mind are picture buttons. The Transporter unfortunately doesn't recognize that picture buttons are different from standard text buttons. In Windows most buttons are defined as picture buttons and when opening the screen in DOS the transporter insists on wanting to transport the button prompts to DOS, which results in button prompt containing the bitmap filename. To avoid this don't tranport buttons, and make code changes manually! Again, if you are working only under either DOS or Windows and don't want to be bothered by the transporter you can either just < Open as is > or turn off the transporter altogether by setting _TRANSPORT="" in the command window or in your CONFIG.FP(W). Adding Time Trakker to your own Menus ------------------------------------- If you plan to use Time Trakker as is either in its standalone mode or from its existing menu you don't have to worry about parameters used by Time Trakker. However, if you want to hook Time Trakker into another menu or hook it into your Develop menu as a submenu it is easy to do so. Time Trakker is very integrated and all menu options can be accessed directly by calling TIMETRAK.APP with the optional keywords. For a list of all the keywords take a look at the POP_VAL.PRG program file, which is the distribution program of 'API' calls to Time Trakker's screens and functions. There is one complication that makes building your own menus with Time Trakker a little tricky. TimeTrakker marks the Punch Out option if there are pending entries that can be 'Punched Out'. You need to let Time Trakker know by way of its parameters whether you want to update this mark and/or where that update should occur. The code for this feature is controlled by a procedure in TIMETRAK.PRG called MARKBAR, in case you want to change this behavior, but by default Time Trakker will mark both it's standalone menu bar and the TIMETRAK.MPR 'Punch Out' options, as well as any bar that you might supply via the 2nd and 3rd parameter. The full Time Trakker syntax is: DO TIMETRAK WITH